package com.xsf.jieyou.provider.service;

import com.xsf.jieyou.provider.domain.TbPermission;

import javax.annotation.Resource;

import com.xsf.jieyou.provider.mapper.TbPermissionMapper;
import com.xsf.jieyou.provider.api.ProviderTbPermissionService;
import org.apache.dubbo.config.annotation.Service;

import java.util.List;

/**
 * 用户权限，Dubbo服务接口实现类。
 * <p>
 * Description:Dubbo 接口实现类
 * </p>
 *
 * @author xsf
 * @version v1.0.0
 * @date 2019/11/15 0015
 **/
@Service(version = "1.0.0")
public class ProviderTbPermissionServiceImpl implements ProviderTbPermissionService {

    @Resource
    private TbPermissionMapper tbPermissionMapper;

    /**
     * 多表查询，根据用户ID获取用户权限
     *
     * @param id 用户ID {@link Long}
     * @return 权限集合 {@link List}
     */
    @Override
    public List<TbPermission> selectByUserId(Long id) {
        return this.tbPermissionMapper.selectByUserId(id);
    }
}
